package com.cloudkinto.vo.user;

import com.cloudkinto.vo.company.CompanyPageVo;
import com.cloudkinto.vo.warehouse.WarehouseRes;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zhangyy
 * @date 2020/4/18 16:58
 * @description:
 */
@Data
public class UserBuildReq {

    @ApiModelProperty("账号")
    @NotBlank(message = "pls.input.account")
    @Length(min = 3, max = 20, message = "account.length.3-20")
    private String userAccount;
    @ApiModelProperty("姓名")
    @NotNull(message = "pls.input.username")
    @Length(min = 1, max = 20, message = "username.length.1-20")
    private String userName;
    @ApiModelProperty("账号状态 0 1 2")
    private Integer userStatus;
    @NotBlank(message = "pls.input.password")
    @Length(min = 6, max = 20, message = "password.length.1-20")
    private String userPassword;
    @ApiModelProperty("角色id")
    @NotNull(message = "pls.choose.role")
    private Long roleId;
    @ApiModelProperty("邮箱")
    private String userMail;
    @ApiModelProperty("电话")
    private String userPhone;
    @ApiModelProperty("头像")
    private Long headFileId;
    @ApiModelProperty("0 客户全部可见 1手动选择")
    private int whiteCus;
    @ApiModelProperty("可见客户id")
    private List<CompanyPageVo> cusList;

    @ApiModelProperty("0 仓库全部可见 1手动选择")
    private int whiteWh;
    @ApiModelProperty("可见仓库id")
    private List<WarehouseRes> whList;

    public UserBuildReq(String userAccount, String userName, String userPassword, Long roleId, String userMail, String userPhone) {
        this.userAccount = userAccount;
        this.userName = userName;
        this.userPassword = userPassword;
        this.roleId = roleId;
        this.userMail = userMail;
        this.userPhone = userPhone;
    }

    public UserBuildReq() {
    }
}
